#!/usr/bin/env bash
sqoop import \
         --connect jdbc:mysql://hadoop000:3306/shop?zeroDateTimeBehavior=convertToNull \
         --username root \
         --password root \
         --table mmall_order -m -1 \
         --fields-terminated-by ',' \
         --target-dir '/user/hive/warehouse/bdm.db/mmall_order/day=2019-06-25' \
         --delete-target-dir

sqoop import \
     --connect jdbc:mysql://192.168.211.134:3306/shop?zeroDateTimeBehavior=convertToNull \
     --username root \
     --password root \
     --table mmall_order_item -m -1 \
     --fields-terminated-by ',' \
     --target-dir '/user/hive/warehouse/bdm.db/mmall_order_item/day=2019-06-25'

sqoop import \
     --connect jdbc:mysql://192.168.211.134:3306/shop?zeroDateTimeBehavior=convertToNull \
     --username root \
     --password root \
     --table mmall_shipping -m -1 \
     --fields-terminated-by ',' \
     --target-dir '/user/hive/warehouse/bdm.db/mmall_shipping/day=2019-06-25'